package com.bdth.service.impl;

import com.bdth.mapper.RoleFuncMapper;
import com.bdth.model.RoleFuncKey;
import com.bdth.service.IRoleFuncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

@Service
public class RoleFuncServiceImpl extends BaseServiceImpl<RoleFuncKey> implements IRoleFuncService {

	@Autowired
	private RoleFuncMapper roleFuncMapper;

	/**
	 * 根据角色id,关联类型删除
	 *
	 * @param roleId
	 */
	public void deleteByRoleId(Integer roleId) {
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("roleID", new BigDecimal(roleId));
		roleFuncMapper.deleteByRoleId(param);
	}

}
